package com.d0324;

import com.d0324.Studennt;

import java.awt.geom.Area;
import java.util.Arrays;

public class TestStudent {
    public static void main(String[] args) {
        System.out.println("排序");
        Studennt s1 = new Studennt("王一博",23,81);
        Studennt s2 = new Studennt("王一博1",22,89);
        Studennt s3 = new Studennt("王一博2",21,88);
        Studennt s4 = new Studennt("王一博3",26,90);
        Studennt[] studennts = new Studennt[]{s1,s2,s3,s4};

        Arrays.sort(studennts,new StudentAgeComparator());

        for (Studennt st:studennts){
            System.out.println(st);
        }


    }
}
